Skip to content

Conversation

@maishivamhoo123
Copy link
Contributor

Type of change

Description

This PR changes the avatar column type from VARCHAR to TEXT in the user table.

Reason:
Some Google profile image URLs exceed the previous character limit (1024/2048 chars), causing 500 errors during login or registration. Switching to TEXT ensures support for long URLs (up to 65kb).

Changes

  1. Entity: Updated User struct in internal/entity/user_entity.go to use TEXT for the avatar field.
  2. Migration: Added v1.8.2 migration (internal/migrations/v32.go) to alter the database column automatically.

Verification

  • Tested locally with MySQL.
  • Verified that inserting a string longer than 2048 characters into the avatar column now succeeds without error.

@maishivamhoo123
Copy link
Contributor Author

maishivamhoo123 commented Feb 6, 2026

@LinkinStars @team can you please review this pr.
Thank you!

@LinkinStars LinkinStars self-requested a review February 9, 2026 04:04
@LinkinStars
Copy link
Member

@maishivamhoo123 After testing, we found an error. This is an error encountered during testing with MySQL. You may need to verify whether the migration works correctly for different database types.
migrate failed: sync user table failed: Error 1101 (42000): BLOB, TEXT, GEOMETRY or JSON column 'avatar' can't have a default value

@maishivamhoo123
Copy link
Contributor Author

@maishivamhoo123 After testing, we found an error. This is an error encountered during testing with MySQL. You may need to verify whether the migration works correctly for different database types. migrate failed: sync user table failed: Error 1101 (42000): BLOB, TEXT, GEOMETRY or JSON column 'avatar' can't have a default value

@LinkinStars sir i have migrated the version to v2.0.1 and i removed the default tag from Avatar .
can you please review the new PR thank you sir.

@LinkinStars LinkinStars self-assigned this Feb 10, 2026
@LinkinStars LinkinStars added this to the v2.0.1 milestone Feb 10, 2026
@maishivamhoo123
Copy link
Contributor Author

@LinkinStars can you please for approve for workflows

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants